package com.javaspeak.designpatterns.go4.structural.flyweight;

/**
 * Defines pixels for a Triangle
 *
 * @author John Dickerson
 */
public class TriangleImpl extends Shape {

    /**
     * Constructor
     */
    public TriangleImpl(){

        //       1
        //     1   1
        //   1       1
        // 1 1 1 1 1 1 1

        points = new int[4][7];
        points[ 0 ][ 3 ] = 1;
        points[ 1 ][ 2 ] = 1;
        points[ 1 ][ 4 ] = 1;
        points[ 2 ][ 1 ] = 1;
        points[ 2 ][ 5 ] = 1;
        points[ 3 ][ 0 ] = 1;
        points[ 3 ][ 1 ] = 1;
        points[ 3 ][ 2 ] = 1;
        points[ 3 ][ 3 ] = 1;
        points[ 3 ][ 4 ] = 1;
        points[ 3 ][ 5 ] = 1;
        points[ 3 ][ 6 ] = 1;
    }
}
